package com.example.consumer.service;

import com.example.consumer.bean.City;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Service
@FeignClient(value = "provider", fallbackFactory = com.example.consumer.config.CityServiceFallbackFactory.class)
public interface CityService {
    @RequestMapping("/city/findall")
    List<City> findAll();

    @RequestMapping("/city/findbyname/{name}")
    List<City> findByName(@PathVariable String name);
}
